﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using AssessmentTool.PresentationLogic.Controllers;
using AdminApplication.Controls;

namespace AdminApplication.PresentationLogic.Controllers
{
    public class AdminLoginController: LoginController
    {
        public AdminLoginController(AdminLogin element)
            : base(element)
        {
            ed.subscrive("ADMINLOGIN", element.onLogin);
            
        }
        protected override bool isAutorizzato(String ruolo)
        {
            return ruolo.CompareTo("UTENTE") != 0;
        }
        protected override void launchLogin()
        {
            ed.dispatch("ADMINLOGIN", new EventArgs());
            ed.dispatch("MENUFIRSTBUILDED", null);
        }
    }
}
